package com.fs.utils;

public class ImgResult {
    private Integer errno;
    private Object data;
    private String message;

    public ImgResult(Integer errno, Object data, String message) {
        this.errno = errno;
        this.data = data;
        this.message = message;
    }
    public static ImgResult success(Object data){

        return new ImgResult(0,data,null);
    }

    public static ImgResult error(String msg){

        return new ImgResult(1,null,msg);
    }

    public Integer getErrno() {
        return errno;
    }

    public ImgResult setErrno(Integer errno) {
        this.errno = errno;
        return this;
    }

    public Object getData() {
        return data;
    }

    public ImgResult setData(Object data) {
        this.data = data;
        return this;
    }

    public String getMessage() {
        return message;
    }

    public ImgResult setMessage(String message) {
        this.message = message;
        return this;
    }
}
